home *** CD-ROM | disk | FTP | other *** search
/ Total Network Tools 2002 / NextStepPublishing-TotalNetworkTools2002-Win95.iso / Archive / Misc Servers / Zope.exe / WIN32TRACEUTIL.PYC (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  1999-07-21  |  1.0 KB  |  36 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 1.5)
  3.  
  4. import win32trace
  5.  
  6. def RunAsCollector():
  7.     import sys
  8.     
  9.     try:
  10.         import win32api
  11.         win32api.SetConsoleTitle('Python Trace Collector')
  12.     except:
  13.         pass
  14.  
  15.     win32trace.InitRead()
  16.     print 'Collecting Python Trace Output...'
  17.     while 1:
  18.         sys.stdout.write(win32trace.blockingread())
  19.  
  20.  
  21. def SetupForPrint():
  22.     import sys
  23.     win32trace.InitWrite()
  24.     
  25.     try:
  26.         print 'Redirecting output to win32trace remote collector'
  27.     except:
  28.         pass
  29.  
  30.     win32trace.setprint()
  31.  
  32. if __name__ == '__main__':
  33.     RunAsCollector()
  34. else:
  35.     SetupForPrint()
  36.